var _n29;
var cc__extends = __extends;
var cc__decorate = __decorate;
var cc__importDefault = __importDefault;
Object.defineProperty(exports, "__esModule", {
  value: true
});
var cc__decorator = cc._decorator;
var ccp_ccclass = cc__decorator.ccclass;
var ccp_property = cc__decorator.property;
var $zqcc_OverallSystem = require("zqcc_OverallSystem");
var $1$PaintBoard = require("zqcc_PaintBoard");
var p = cc__importDefault($1$PaintBoard);
var def_PaintCtrl = function (t) {
  function _ctor() {
    // 初始化变量，确保t存在则调用它，否则返回当前上下文
    var instance = null !== t && t.apply(this, arguments) || this;

    // 设置对象的基本属性
    instance.paintBoard = null;        // 绘画板属性初始化为null
    instance.prevStepButton = null;    // 上一步按钮初始化为null
    instance.nextStepButton = null;    // 下一步按钮初始化为null
    instance.playButton = null;        // 播放按钮初始化为null

    // 返回创建的对象
    return instance;

  }
  cc__extends(_ctor, t);
  _ctor.prototype.start = function () {
    this.node.on(cc.Node.EventType.TOUCH_END, this.onPaintBoardClick, this);
  };
  _ctor.prototype.setPaintBoard = function (t) {
    this.paintBoard = t;
  };
  _ctor.prototype.onPaintBoardClick = function (t) {
    cc.log("onPaintBoardClick", t);
    $zqcc_OverallSystem.mgrs().soundMgr.playBtnSound();
    this.paintBoard.autoPlayClick();
    this.playButton.node.active = !this.paintBoard.isAutoPlaying;
  };
  _ctor.prototype.onPrevStepButtonClick = function () {
    cc.log("onPrevStepButtonClick");
    $zqcc_OverallSystem.mgrs().soundMgr.playBtnSound();
    this.paintBoard.playPrevStepManually();
    this.playButton.node.active = !this.paintBoard.isAutoPlaying;
  };
  _ctor.prototype.onNextStepButtonClick = function () {
    cc.log("onNextStepButtonClick");
    $zqcc_OverallSystem.mgrs().soundMgr.playBtnSound();
    this.paintBoard.playNextStepManually();
    this.playButton.node.active = !this.paintBoard.isAutoPlaying;
  };
  cc__decorate([ccp_property(p.default)], _ctor.prototype, "paintBoard", undefined);
  cc__decorate([ccp_property(cc.Button)], _ctor.prototype, "prevStepButton", undefined);
  cc__decorate([ccp_property(cc.Button)], _ctor.prototype, "nextStepButton", undefined);
  cc__decorate([ccp_property(cc.Button)], _ctor.prototype, "playButton", undefined);
  return cc__decorate([ccp_ccclass], _ctor);
}(cc.Component);
exports.default = def_PaintCtrl;